/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.srp.violate.services.internal;


import za.ac.cput.srp.violate.model.DVD;
import za.ac.cput.srp.violate.services.Disk;

/**
 *
 * @author Abduraghmaan
 */
public class ReadWriteDisk implements Disk{
    
    @Override
    public int determineSize(DVD dvd)
    {
        int size = 0;
        
       if(dvd.getType().equals("CD"))
           size = 700;
       else
           if(dvd.getType().equals("DVD"))
               size = 4700;
       
       return size;
    }

    @Override
    public boolean available(DVD dvd) 
    {
        if(dvd.isAvailability())
            return true;
        else
            return false;
    }

    @Override
    public double calcSalary(DVD dvd) 
    {
        double salary;
        
        salary = dvd.getStaffSalary() - (dvd.getStaffSalary() * 0.14);
        
        return salary;
    }
    
}
